﻿<UserControl xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  x:Class="SLDemo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="331" d:DesignWidth="544">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="28" />
            <RowDefinition Height="*" />
            <RowDefinition Height="28" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Rectangle Grid.Row="0" Fill="#FFDEDEDE"></Rectangle>
        <TextBlock Grid.Row="0" VerticalAlignment="Center" FontSize="16">Add control to canvas on UI thread</TextBlock>
        <Grid Grid.Row="1" Margin="12,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="26" />
                <RowDefinition Height="274*" />
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal">
                <Button Name="btnReset" Content="Reset" Click="btnReset_Click" Margin="0,0,6,0" VerticalAlignment="Center"></Button>
                <Button Name="btnNormal" Content="Normal" Click="btnNormal_Click" Margin="0,0,6,0" VerticalAlignment="Center"></Button>
                <Button Name="btnQuickSL" Content="QuickSL" Click="btnQuickSL_Click" Margin="0,0,6,0" VerticalAlignment="Center"></Button>
                <TextBox Width="230" Margin="0,0,6,0" VerticalAlignment="Center" Text="Input to test UI Block"></TextBox>
            </StackPanel>
            <Grid Name="recLayout" Grid.Row="1">
                <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top">
                    <Run Text="When using "></Run>
                    <Bold>QuickSL</Bold>
                    <Run Text=", you can "></Run>
                    <Bold>touch or click</Bold>
                    <Run Text=" the screen to "></Run>
                    <Bold>pause</Bold>
                    <Run Text=" the UI process!!!"></Run>
                </TextBlock>
                <TextBlock TextAlignment="Center" FontSize="23" HorizontalAlignment="Center" VerticalAlignment="Center" Name="txtCount">0</TextBlock>
            </Grid>
        </Grid>

        <Rectangle Grid.Row="2" Fill="#FFDEDEDE"></Rectangle>
        <TextBlock Grid.Row="2" VerticalAlignment="Center" FontSize="16">Process a Long-Time implement</TextBlock>
        <Grid Grid.Row="3" Margin="12,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="29" />
                <RowDefinition Height="111*" />
            </Grid.RowDefinitions>
            
            <StackPanel Orientation="Horizontal">
                <Button Margin="0,0,6,0" VerticalAlignment="Center" Name="btnLoad" Click="btnLoad_Click">Load</Button>
                <Button Margin="0,0,6,0" VerticalAlignment="Center" Name="btnCancel" Click="btnCancel_Click">Canel</Button>
            </StackPanel>
            <Grid Grid.Row="1" Name="ntLayout"></Grid>
            <toolkit:BusyIndicator Name="bsyIndicator" Grid.Row="1" IsBusy="False"/>
        </Grid>
    </Grid>
</UserControl>
